//
//  LogCatDelegateHelper.h
//  LogCat
//
//  Created by 清风徐来 on 2023/12/15.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/** 初始化SDK结果Block */
typedef void (^HandUrlResultBlock)(NSString *msg);

@interface LogCatDelegateHelper : NSObject

/// 打开链接
/// - Parameter url: 链接地址
+(BOOL)handleOpenURL:(NSURL *)url;

/// 打开链接
/// - Parameter url: 链接地址
/// - Parameter successBlock: 回调
+(BOOL)handleOpenURL:(NSURL *)url withSuccessBlock:(_Nullable HandUrlResultBlock)successBlock;

/// 打开指定链接
/// - Parameter url: url description
+ (void)openLinkWithURL:(NSURL *)url;

/// 获取IP地址
+ (NSString *)getIPAddress;

/// 检测IP
/// - Parameter completion: 回调
+ (void)checkIfIPisFromChinaWithCompletion:(void (^)(BOOL isInChina))completion;

@end

NS_ASSUME_NONNULL_END
